/*
 * File: cf_9axis2.c
 *
 * Code generated for Simulink model 'cf_9axis2'.
 *
 * Model version                  : 1.226
 * Simulink Coder version         : 8.14 (R2018a) 06-Feb-2018
 * C/C++ source code generated on : Wed Feb 27 19:57:07 2019
 *
 * Target selection: ert.tlc
 * Embedded hardware selection: ARM Compatible->ARM Cortex
 * Code generation objective: Execution efficiency
 * Validation result: Not run
 */

#include "cf_9axis2.h"

/* Block signals and states (default storage) */
DW_cf_9axis2_T cf_9axis2_DW;
static void cf_9axis2_cf_9axis_Init(DW_cf_9axis_cf_9axis2_T *localDW);
static void cf_9axis2_cf_9axis(const accel_m *rtu_accel_m, const gyro_m
  *rtu_gyro_m, const mag_m *rtu_mag_m, euler *rty_Euler, DW_cf_9axis_cf_9axis2_T
  *localDW);

/* System initialize for atomic system: '<Root>/cf_9axis' */
static void cf_9axis2_cf_9axis_Init(DW_cf_9axis_cf_9axis2_T *localDW)
{
  /* InitializeConditions for DiscreteIntegrator: '<S7>/Discrete-Time Integrator' */
  localDW->DiscreteTimeIntegrator_DSTATE[0] = 1.0;
  localDW->DiscreteTimeIntegrator_DSTATE[1] = 0.0;
  localDW->DiscreteTimeIntegrator_DSTATE[2] = 0.0;
  localDW->DiscreteTimeIntegrator_DSTATE[3] = 0.0;
}

/* Output and update for atomic system: '<Root>/cf_9axis' */
static void cf_9axis2_cf_9axis(const accel_m *rtu_accel_m, const gyro_m
  *rtu_gyro_m, const mag_m *rtu_mag_m, euler *rty_Euler, DW_cf_9axis_cf_9axis2_T
  *localDW)
{
  real_T rtb_jxi;
  real_T rtb_ixk;
  real_T rtb_Product2_gq;
  real_T rtb_Product1_jl;
  real_T rtb_VectorConcatenate[9];
  real_T rtb_Product3_b;
  real_T rtb_Add[3];
  real_T rtb_Transpose1[9];
  real_T rtb_Integrator_h[3];
  real_T rtb_Integrator[3];
  real_T rtb_Transpose1_0[9];
  int32_T i;
  real_T rtb_VectorConcatenate_b_idx_0;
  real_T rtb_VectorConcatenate_b_idx_1;
  real_T rtb_VectorConcatenate_tmp;
  real_T rtb_VectorConcatenate_tmp_0;
  real_T rtb_VectorConcatenate_tmp_1;
  real_T rtb_VectorConcatenate_tmp_2;
  real_T rtb_VectorConcatenate_tmp_3;
  real_T rtb_jxi_tmp;

  /* Sqrt: '<S35>/sqrt' incorporates:
   *  DiscreteIntegrator: '<S7>/Discrete-Time Integrator'
   *  Product: '<S36>/Product'
   *  Product: '<S36>/Product1'
   *  Product: '<S36>/Product2'
   *  Product: '<S36>/Product3'
   *  Sqrt: '<S10>/sqrt'
   *  Sqrt: '<S38>/sqrt'
   *  Sum: '<S36>/Sum'
   */
  rtb_jxi_tmp = sqrt(((localDW->DiscreteTimeIntegrator_DSTATE[0] *
                       localDW->DiscreteTimeIntegrator_DSTATE[0] +
                       localDW->DiscreteTimeIntegrator_DSTATE[1] *
                       localDW->DiscreteTimeIntegrator_DSTATE[1]) +
                      localDW->DiscreteTimeIntegrator_DSTATE[2] *
                      localDW->DiscreteTimeIntegrator_DSTATE[2]) +
                     localDW->DiscreteTimeIntegrator_DSTATE[3] *
                     localDW->DiscreteTimeIntegrator_DSTATE[3]);

  /* Product: '<S34>/Product' incorporates:
   *  DiscreteIntegrator: '<S7>/Discrete-Time Integrator'
   *  Sqrt: '<S35>/sqrt'
   */
  rtb_Product1_jl = localDW->DiscreteTimeIntegrator_DSTATE[0] / rtb_jxi_tmp;

  /* Product: '<S34>/Product1' incorporates:
   *  DiscreteIntegrator: '<S7>/Discrete-Time Integrator'
   *  Sqrt: '<S35>/sqrt'
   */
  rtb_Product2_gq = localDW->DiscreteTimeIntegrator_DSTATE[1] / rtb_jxi_tmp;

  /* Product: '<S34>/Product2' incorporates:
   *  DiscreteIntegrator: '<S7>/Discrete-Time Integrator'
   *  Sqrt: '<S35>/sqrt'
   */
  rtb_ixk = localDW->DiscreteTimeIntegrator_DSTATE[2] / rtb_jxi_tmp;

  /* Product: '<S34>/Product3' incorporates:
   *  DiscreteIntegrator: '<S7>/Discrete-Time Integrator'
   *  Sqrt: '<S35>/sqrt'
   */
  rtb_jxi = localDW->DiscreteTimeIntegrator_DSTATE[3] / rtb_jxi_tmp;

  /* Product: '<S24>/Product3' incorporates:
   *  Product: '<S28>/Product3'
   */
  rtb_VectorConcatenate_b_idx_0 = rtb_Product1_jl * rtb_Product1_jl;

  /* Product: '<S24>/Product2' incorporates:
   *  Product: '<S28>/Product2'
   */
  rtb_VectorConcatenate_b_idx_1 = rtb_Product2_gq * rtb_Product2_gq;

  /* Product: '<S24>/Product1' incorporates:
   *  Product: '<S28>/Product1'
   *  Product: '<S32>/Product1'
   */
  rtb_Product3_b = rtb_ixk * rtb_ixk;

  /* Product: '<S24>/Product' incorporates:
   *  Product: '<S28>/Product'
   *  Product: '<S32>/Product'
   */
  rtb_VectorConcatenate_tmp_1 = rtb_jxi * rtb_jxi;

  /* Sum: '<S24>/Sum' incorporates:
   *  Product: '<S24>/Product'
   *  Product: '<S24>/Product1'
   *  Product: '<S24>/Product2'
   *  Product: '<S24>/Product3'
   */
  rtb_VectorConcatenate[0] = ((rtb_VectorConcatenate_b_idx_0 +
    rtb_VectorConcatenate_b_idx_1) - rtb_Product3_b) -
    rtb_VectorConcatenate_tmp_1;

  /* Product: '<S27>/Product3' incorporates:
   *  Product: '<S25>/Product3'
   */
  rtb_VectorConcatenate_tmp = rtb_jxi * rtb_Product1_jl;

  /* Product: '<S27>/Product2' incorporates:
   *  Product: '<S25>/Product2'
   */
  rtb_VectorConcatenate_tmp_0 = rtb_Product2_gq * rtb_ixk;

  /* Gain: '<S27>/Gain' incorporates:
   *  Product: '<S27>/Product2'
   *  Product: '<S27>/Product3'
   *  Sum: '<S27>/Sum'
   */
  rtb_VectorConcatenate[1] = (rtb_VectorConcatenate_tmp_0 -
    rtb_VectorConcatenate_tmp) * 2.0;

  /* Product: '<S30>/Product2' incorporates:
   *  Product: '<S26>/Product2'
   */
  rtb_VectorConcatenate_tmp_2 = rtb_Product2_gq * rtb_jxi;

  /* Product: '<S30>/Product1' incorporates:
   *  Product: '<S26>/Product1'
   */
  rtb_VectorConcatenate_tmp_3 = rtb_Product1_jl * rtb_ixk;

  /* Gain: '<S30>/Gain' incorporates:
   *  Product: '<S30>/Product1'
   *  Product: '<S30>/Product2'
   *  Sum: '<S30>/Sum'
   */
  rtb_VectorConcatenate[2] = (rtb_VectorConcatenate_tmp_3 +
    rtb_VectorConcatenate_tmp_2) * 2.0;

  /* Gain: '<S25>/Gain' incorporates:
   *  Sum: '<S25>/Sum'
   */
  rtb_VectorConcatenate[3] = (rtb_VectorConcatenate_tmp +
    rtb_VectorConcatenate_tmp_0) * 2.0;

  /* Sum: '<S28>/Sum' incorporates:
   *  Sum: '<S32>/Sum'
   */
  rtb_VectorConcatenate_b_idx_0 -= rtb_VectorConcatenate_b_idx_1;
  rtb_VectorConcatenate[4] = (rtb_VectorConcatenate_b_idx_0 + rtb_Product3_b) -
    rtb_VectorConcatenate_tmp_1;

  /* Product: '<S31>/Product1' incorporates:
   *  Product: '<S29>/Product1'
   */
  rtb_VectorConcatenate_b_idx_1 = rtb_Product1_jl * rtb_Product2_gq;

  /* Product: '<S31>/Product2' incorporates:
   *  Product: '<S29>/Product2'
   */
  rtb_VectorConcatenate_tmp = rtb_ixk * rtb_jxi;

  /* Gain: '<S31>/Gain' incorporates:
   *  Product: '<S31>/Product1'
   *  Product: '<S31>/Product2'
   *  Sum: '<S31>/Sum'
   */
  rtb_VectorConcatenate[5] = (rtb_VectorConcatenate_tmp -
    rtb_VectorConcatenate_b_idx_1) * 2.0;

  /* Gain: '<S26>/Gain' incorporates:
   *  Sum: '<S26>/Sum'
   */
  rtb_VectorConcatenate[6] = (rtb_VectorConcatenate_tmp_2 -
    rtb_VectorConcatenate_tmp_3) * 2.0;

  /* Gain: '<S29>/Gain' incorporates:
   *  Sum: '<S29>/Sum'
   */
  rtb_VectorConcatenate[7] = (rtb_VectorConcatenate_b_idx_1 +
    rtb_VectorConcatenate_tmp) * 2.0;

  /* Sum: '<S32>/Sum' */
  rtb_VectorConcatenate[8] = (rtb_VectorConcatenate_b_idx_0 - rtb_Product3_b) +
    rtb_VectorConcatenate_tmp_1;

  /* Product: '<S9>/Product' incorporates:
   *  DiscreteIntegrator: '<S7>/Discrete-Time Integrator'
   */
  rtb_Product2_gq = localDW->DiscreteTimeIntegrator_DSTATE[0] / rtb_jxi_tmp;

  /* Product: '<S9>/Product1' incorporates:
   *  DiscreteIntegrator: '<S7>/Discrete-Time Integrator'
   */
  rtb_ixk = localDW->DiscreteTimeIntegrator_DSTATE[1] / rtb_jxi_tmp;

  /* Product: '<S9>/Product2' incorporates:
   *  DiscreteIntegrator: '<S7>/Discrete-Time Integrator'
   */
  rtb_jxi = localDW->DiscreteTimeIntegrator_DSTATE[2] / rtb_jxi_tmp;

  /* Product: '<S9>/Product3' incorporates:
   *  DiscreteIntegrator: '<S7>/Discrete-Time Integrator'
   */
  rtb_Product1_jl = localDW->DiscreteTimeIntegrator_DSTATE[3] / rtb_jxi_tmp;

  /* Trigonometry: '<S8>/Trigonometric Function1' incorporates:
   *  Fcn: '<S4>/fcn1'
   *  Fcn: '<S4>/fcn2'
   */
  rtb_VectorConcatenate_b_idx_0 = atan2((rtb_ixk * rtb_jxi + rtb_Product2_gq *
    rtb_Product1_jl) * 2.0, ((rtb_Product2_gq * rtb_Product2_gq + rtb_ixk *
    rtb_ixk) - rtb_jxi * rtb_jxi) - rtb_Product1_jl * rtb_Product1_jl);

  /* Fcn: '<S4>/fcn3' */
  rtb_VectorConcatenate_b_idx_1 = (rtb_ixk * rtb_Product1_jl - rtb_Product2_gq *
    rtb_jxi) * -2.0;

  /* Trigonometry: '<S8>/trigFcn' */
  if (rtb_VectorConcatenate_b_idx_1 > 1.0) {
    rtb_VectorConcatenate_b_idx_1 = 1.0;
  } else {
    if (rtb_VectorConcatenate_b_idx_1 < -1.0) {
      rtb_VectorConcatenate_b_idx_1 = -1.0;
    }
  }

  rtb_VectorConcatenate_b_idx_1 = asin(rtb_VectorConcatenate_b_idx_1);

  /* End of Trigonometry: '<S8>/trigFcn' */

  /* Fcn: '<S4>/fcn4' */
  rtb_Product3_b = (rtb_jxi * rtb_Product1_jl + rtb_Product2_gq * rtb_ixk) * 2.0;

  /* Fcn: '<S4>/fcn5' */
  rtb_Product2_gq = ((rtb_Product2_gq * rtb_Product2_gq - rtb_ixk * rtb_ixk) -
                     rtb_jxi * rtb_jxi) + rtb_Product1_jl * rtb_Product1_jl;

  /* Trigonometry: '<S8>/Trigonometric Function3' */
  rtb_ixk = atan2(rtb_Product3_b, rtb_Product2_gq);

  /* Trigonometry: '<S16>/sincos' incorporates:
   *  SignalConversion: '<S16>/TmpSignal ConversionAtsincosInport1'
   */
  rtb_Integrator_h[1] = cos(rtb_VectorConcatenate_b_idx_1);
  rtb_Add[1] = sin(rtb_VectorConcatenate_b_idx_1);
  rtb_Integrator_h[2] = cos(rtb_ixk);
  rtb_Product1_jl = sin(rtb_ixk);

  /* Fcn: '<S16>/Fcn11' */
  rtb_Transpose1[0] = rtb_Integrator_h[1];

  /* Fcn: '<S16>/Fcn21' */
  rtb_Transpose1[1] = rtb_Product1_jl * rtb_Add[1];

  /* Fcn: '<S16>/Fcn31' */
  rtb_Transpose1[2] = rtb_Integrator_h[2] * rtb_Add[1];

  /* Fcn: '<S16>/Fcn12' */
  rtb_Transpose1[3] = 0.0;

  /* Fcn: '<S16>/Fcn22' */
  rtb_Transpose1[4] = rtb_Integrator_h[2];

  /* Fcn: '<S16>/Fcn32' */
  rtb_Transpose1[5] = 0.0 - rtb_Product1_jl;

  /* Fcn: '<S16>/Fcn13' */
  rtb_Transpose1[6] = -rtb_Add[1];

  /* Fcn: '<S16>/Fcn23' */
  rtb_Transpose1[7] = rtb_Product1_jl * rtb_Integrator_h[1];

  /* Fcn: '<S16>/Fcn33' */
  rtb_Transpose1[8] = rtb_Integrator_h[2] * rtb_Integrator_h[1];

  /* Math: '<S6>/Transpose1' */
  for (i = 0; i < 3; i++) {
    rtb_Transpose1_0[3 * i] = rtb_Transpose1[i];
    rtb_Transpose1_0[1 + 3 * i] = rtb_Transpose1[i + 3];
    rtb_Transpose1_0[2 + 3 * i] = rtb_Transpose1[i + 6];
  }

  for (i = 0; i < 3; i++) {
    rtb_Transpose1[3 * i] = rtb_Transpose1_0[3 * i];
    rtb_Transpose1[1 + 3 * i] = rtb_Transpose1_0[3 * i + 1];
    rtb_Transpose1[2 + 3 * i] = rtb_Transpose1_0[3 * i + 2];
  }

  /* End of Math: '<S6>/Transpose1' */

  /* SignalConversion: '<S6>/TmpSignal ConversionAtMatrix Multiply1Inport2' */
  rtb_Integrator_h[0] = rtu_mag_m->x;
  rtb_Integrator_h[1] = rtu_mag_m->y;
  rtb_Integrator_h[2] = rtu_mag_m->z;
  for (i = 0; i < 3; i++) {
    /* Product: '<S6>/Matrix Multiply2' */
    rtb_Add[i] = rtb_Transpose1[i + 6] * rtb_Integrator_h[2] + (rtb_Transpose1[i
      + 3] * rtb_Integrator_h[1] + rtb_Transpose1[i] * rtb_Integrator_h[0]);

    /* Product: '<S6>/Matrix Multiply1' incorporates:
     *  Math: '<S6>/Transpose'
     */
    rtb_Integrator[i] = rtb_VectorConcatenate[3 * i + 2] * rtb_Integrator_h[2] +
      (rtb_VectorConcatenate[3 * i + 1] * rtb_Integrator_h[1] +
       rtb_VectorConcatenate[3 * i] * rtb_Integrator_h[0]);
  }

  /* Sum: '<S6>/Sum of Elements' incorporates:
   *  Math: '<S6>/Math Function'
   */
  rtb_Product3_b = rtb_Integrator[0] * rtb_Integrator[0] + rtb_Integrator[1] *
    rtb_Integrator[1];

  /* Sqrt: '<S6>/Math Function1'
   *
   * About '<S6>/Math Function1':
   *  Operator: signedSqrt
   */
  if (rtb_Product3_b < 0.0) {
    rtb_Product3_b = -sqrt(fabs(rtb_Product3_b));
  } else {
    rtb_Product3_b = sqrt(rtb_Product3_b);
  }

  /* End of Sqrt: '<S6>/Math Function1' */

  /* SignalConversion: '<S6>/TmpSignal ConversionAtMatrix Multiply3Inport2' */
  rtb_Product1_jl = rtb_Integrator[2];

  /* Trigonometry: '<S17>/sincos' incorporates:
   *  SignalConversion: '<S17>/TmpSignal ConversionAtsincosInport1'
   */
  rtb_Product2_gq = cos(rtb_VectorConcatenate_b_idx_0);
  rtb_jxi = sin(rtb_VectorConcatenate_b_idx_0);

  /* Fcn: '<S17>/Fcn11' */
  rtb_Transpose1[0] = rtb_Product2_gq;

  /* Fcn: '<S17>/Fcn21' */
  rtb_Transpose1[1] = 0.0 - rtb_jxi;

  /* Fcn: '<S17>/Fcn31' */
  rtb_Transpose1[2] = 0.0;

  /* Fcn: '<S17>/Fcn12' */
  rtb_Transpose1[3] = rtb_jxi;

  /* Fcn: '<S17>/Fcn22' */
  rtb_Transpose1[4] = rtb_Product2_gq;

  /* Fcn: '<S17>/Fcn32' */
  rtb_Transpose1[5] = 0.0;

  /* Fcn: '<S17>/Fcn13' */
  rtb_Transpose1[6] = -0.0;

  /* Fcn: '<S17>/Fcn23' */
  rtb_Transpose1[7] = 0.0;

  /* Fcn: '<S17>/Fcn33' */
  rtb_Transpose1[8] = 1.0;
  for (i = 0; i < 3; i++) {
    /* Product: '<S6>/Matrix Multiply3' incorporates:
     *  SignalConversion: '<S6>/TmpSignal ConversionAtMatrix Multiply3Inport2'
     */
    rtb_Integrator_h[i] = rtb_Transpose1[i + 6] * rtb_Product1_jl +
      rtb_Transpose1[i] * rtb_Product3_b;

    /* Product: '<S5>/Matrix Multiply2' */
    rtb_Integrator[i] = -rtb_VectorConcatenate[i + 6];
  }

  /* Sum: '<S15>/Sum' incorporates:
   *  Constant: '<S6>/Constant'
   *  Constant: '<S6>/Constant1'
   *  Product: '<S18>/i x j'
   *  Product: '<S18>/j x k'
   *  Product: '<S18>/k x i'
   *  Product: '<S19>/j x i'
   */
  localDW->mag_cross_product[0] = 0.0;
  localDW->mag_cross_product[1] = 0.0;
  localDW->mag_cross_product[2] = rtb_Add[0] * rtb_Integrator_h[1] - rtb_Add[1] *
    rtb_Integrator_h[0];

  /* Sum: '<S1>/Add' incorporates:
   *  DiscreteIntegrator: '<S2>/Integrator'
   *  DiscreteIntegrator: '<S3>/Integrator'
   *  Gain: '<S2>/Proportional Gain'
   *  Gain: '<S3>/Proportional Gain'
   *  Product: '<S13>/i x j'
   *  Product: '<S13>/j x k'
   *  Product: '<S13>/k x i'
   *  Product: '<S14>/i x k'
   *  Product: '<S14>/j x i'
   *  Product: '<S14>/k x j'
   *  Sum: '<S12>/Sum'
   *  Sum: '<S1>/Add3'
   *  Sum: '<S2>/Sum'
   *  Sum: '<S3>/Sum'
   */
  rtb_Add[0] = (((rtu_accel_m->y * rtb_Integrator[2] - rtu_accel_m->z *
                  rtb_Integrator[1]) * 10.0 + localDW->Integrator_DSTATE[0]) +
                (5.0 * localDW->mag_cross_product[0] +
                 localDW->Integrator_DSTATE_k[0])) + rtu_gyro_m->x;
  rtb_Add[1] = (((rtu_accel_m->z * rtb_Integrator[0] - rtu_accel_m->x *
                  rtb_Integrator[2]) * 10.0 + localDW->Integrator_DSTATE[1]) +
                (5.0 * localDW->mag_cross_product[1] +
                 localDW->Integrator_DSTATE_k[1])) + rtu_gyro_m->y;
  rtb_Add[2] = (((rtu_accel_m->x * rtb_Integrator[1] - rtu_accel_m->y *
                  rtb_Integrator[0]) * 10.0 + localDW->Integrator_DSTATE[2]) +
                (5.0 * localDW->mag_cross_product[2] +
                 localDW->Integrator_DSTATE_k[2])) + rtu_gyro_m->z;

  /* Product: '<S37>/Product' incorporates:
   *  DiscreteIntegrator: '<S7>/Discrete-Time Integrator'
   */
  rtb_jxi = localDW->DiscreteTimeIntegrator_DSTATE[0] / rtb_jxi_tmp;

  /* Product: '<S37>/Product1' incorporates:
   *  DiscreteIntegrator: '<S7>/Discrete-Time Integrator'
   */
  rtb_Product1_jl = localDW->DiscreteTimeIntegrator_DSTATE[1] / rtb_jxi_tmp;

  /* Product: '<S37>/Product2' incorporates:
   *  DiscreteIntegrator: '<S7>/Discrete-Time Integrator'
   */
  rtb_Product2_gq = localDW->DiscreteTimeIntegrator_DSTATE[2] / rtb_jxi_tmp;

  /* Product: '<S37>/Product3' incorporates:
   *  DiscreteIntegrator: '<S7>/Discrete-Time Integrator'
   */
  rtb_Product3_b = localDW->DiscreteTimeIntegrator_DSTATE[3] / rtb_jxi_tmp;

  /* BusCreator: '<S1>/Bus Creator' */
  rty_Euler->roll = rtb_ixk;
  rty_Euler->pitch = rtb_VectorConcatenate_b_idx_1;
  rty_Euler->yaw = rtb_VectorConcatenate_b_idx_0;

  /* Update for DiscreteIntegrator: '<S7>/Discrete-Time Integrator' incorporates:
   *  Fcn: '<S23>/q0dot'
   *  Fcn: '<S23>/q1dot'
   *  Fcn: '<S23>/q2dot'
   *  Fcn: '<S23>/q3dot'
   */
  localDW->DiscreteTimeIntegrator_DSTATE[0] += ((rtb_Product1_jl * rtb_Add[0] +
    rtb_Product2_gq * rtb_Add[1]) + rtb_Product3_b * rtb_Add[2]) * -0.5 * 0.002;
  localDW->DiscreteTimeIntegrator_DSTATE[1] += ((rtb_jxi * rtb_Add[0] +
    rtb_Product2_gq * rtb_Add[2]) - rtb_Product3_b * rtb_Add[1]) * 0.5 * 0.002;
  localDW->DiscreteTimeIntegrator_DSTATE[2] += ((rtb_jxi * rtb_Add[1] +
    rtb_Product3_b * rtb_Add[0]) - rtb_Product1_jl * rtb_Add[2]) * 0.5 * 0.002;
  localDW->DiscreteTimeIntegrator_DSTATE[3] += ((rtb_jxi * rtb_Add[2] +
    rtb_Product1_jl * rtb_Add[1]) - rtb_Product2_gq * rtb_Add[0]) * 0.5 * 0.002;
}

/* Model step function */
void cf_9axis2_step(accel_m *arg_accel_m, gyro_m *arg_gyro_m, mag_m *arg_mag_m,
                    euler *arg_euler)
{
  /* Outputs for Atomic SubSystem: '<Root>/cf_9axis' */

  /* Outport: '<Root>/euler' incorporates:
   *  Inport: '<Root>/accel_m'
   *  Inport: '<Root>/gyro_m'
   *  Inport: '<Root>/mag_m'
   */
  cf_9axis2_cf_9axis(arg_accel_m, arg_gyro_m, arg_mag_m, arg_euler,
                     &cf_9axis2_DW.cf_9axis);

  /* End of Outputs for SubSystem: '<Root>/cf_9axis' */
}

/* Model initialize function */
void cf_9axis_initialize(void)
{
  /* SystemInitialize for Atomic SubSystem: '<Root>/cf_9axis' */
  cf_9axis2_cf_9axis_Init(&cf_9axis2_DW.cf_9axis);

  /* End of SystemInitialize for SubSystem: '<Root>/cf_9axis' */
}

/*
 * File trailer for generated code.
 *
 * [EOF]
 */
